package cn.yunhe.util;

import com.fasterxml.jackson.annotation.JsonInclude;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@JsonInclude(value = JsonInclude.Include.NON_NULL)//只将不为空的属性和属性值解析为json格式，否则不解析
public class Result<T> implements Serializable {
    private Integer code;
    private String mssage;
    private List<T>list=new ArrayList<>();

    public Result() {
    }

    public Result(Integer code, String mssage) {
        this.code = code;
        this.mssage = mssage;
    }

    public Result(Integer code, String mssage, List<T> list) {
        this.code = code;
        this.mssage = mssage;
        this.list = list;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMssage() {
        return mssage;
    }

    public void setMssage(String mssage) {
        this.mssage = mssage;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }
}
